@extends('admin.layouts.base')
@section('title','产品表现数据')
@section('pageHeader','产品表现数据')

@section('content')
    <div class="row">

        <!-- Nav tabs -->
        <ul class="nav nav-tabs" role="tablist">
            <li role="presentation">
                <a href="{{ url('/admin/data/user/index')}}" aria-controls="tab1" role="tab">
                    昨日产品总览
                </a>
            </li>
            <li role="presentation" class="active">
                <a href="{{ url('/admin/data/user/index?tab=1')}}" aria-controls="tab2" role="tab">
                    30天产品总览
                </a>
            </li>
        </ul>

        {{--30天产品总览 开始--}}
        <div class="col-xs-12">
            <div class="box">
                <div class="box-header">
                </div>

                <div class="box-footer" style="overflow: hidden">

                    <table id="records-table" class="table table-bordered table-striped">
                        <thead>
                        <tr>
                            <th>#</th>
                            <th>产品名称</th>
                            <th>30天PV</th>
                            <th>30天UV</th>
                            <th>30天注册总数</th>
                            <th>30天登录总数</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>

                        @foreach($dataList as $key => $data)
                            <tr>
                                <td>{{ $key + 1 }}</td>
                                <td>
                                    {{--<img src="{{ $data->product_logo }}" width="30" alt="logo">--}}
                                    <?php echo config('xianjindai.app_name')[$data['app_name']] ?>
                                </td>
                                <td>{{ $data->pv }}</td>
                                <td>{{ $data->uv }}</td>
                                <td>{{ $data->register_total }}</td>
                                <td>{{ $data->login_total }}</td>
                                <td>
                                    <a href="{{ url('/admin/data/user/lists/' . $data->app_name) }}"
                                       class="btn btn-info btn-xs">信息详情</a>
                                </td>
                            </tr>
                        @endforeach

                        </tbody>
                    </table>

                    {{--导出Excel 开始--}}
                    <div class="pull-right">
                        <span style="display: inline-block;margin: 20px;">
                            <a href="{{ url('/admin/data/user/excel?tab=' . \App\Http\Controllers\Admin\DataUserController::EXCEL_MONTH) }}">
                                <button type="button" class="btn btn-warning btn-xs">
                                    导出Excel
                                </button>
                            </a>
                        </span>
                    </div>
                    {{--导出Excel 结束--}}

                </div>
            </div>
        </div>
        {{--30天产品总览 结束--}}

    </div>
@endsection
